#include "Approver.h"
#include "LeaveRequest.h"

#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    GroupApprover    *groupApprover    = new GroupApprover(1);
    MinisterApprover *ministerApprover = new MinisterApprover(3);
    ManagerApprover  *managerApprover  = new ManagerApprover();
    groupApprover->setSuccessor(ministerApprover);
    ministerApprover->setSuccessor(managerApprover);

    LeaveRequest *aRequest = new LeaveRequest("张三", 1);
    LeaveRequest *bRequest = new LeaveRequest("李四", 3);
    LeaveRequest *cRequest = new LeaveRequest("王五", 5);

    std::cout << "*****************************" << std::endl;
    groupApprover->processRequest(aRequest);
    std::cout << "*****************************" << std::endl;
    groupApprover->processRequest(bRequest);
    std::cout << "*****************************" << std::endl;
    groupApprover->processRequest(cRequest);
    std::cout << "*****************************" << std::endl;
    return 0;
}